home *** CD-ROM | disk | FTP | other *** search
/ CD Loisirs 6 / CDL_N6.iso / mac / CD Loisirs N°6 / PaperPlanes / Paper Planes / Shared.dxr / 01050_annotation scripts.ls < prev    next >
Encoding:
Text File  |  1994-08-25  |  1.1 KB  |  46 lines

  1. on initAnnotations firstSprite, numAnnot
  2.   global FirstAnnot, AnnotList, NumAnnotations
  3.   set AnnotList to []
  4.   set NumAnnotations to numAnnot
  5.   set FirstAnnot to firstSprite
  6.   if NumAnnotations > 0 then
  7.     repeat with i = 0 to NumAnnotations - 1
  8.       set the visible of sprite (FirstAnnot + i) to 0
  9.       updateStage()
  10.       setAt(AnnotList, i + 1, 0)
  11.     end repeat
  12.   end if
  13. end
  14.  
  15. on startAnnotTimer
  16.   startTimer()
  17. end
  18.  
  19. on setAppearTime annot, ticks
  20.   setAt(AnnotList, annot, ticks)
  21. end
  22.  
  23. on checkAppear
  24.   global FirstAnnot, AnnotList, NumAnnotations
  25.   if NumAnnotations > 0 then
  26.     repeat with i = 1 to NumAnnotations
  27.       set test to getAt(AnnotList, i)
  28.       if the timer > test then
  29.         set the visible of sprite (FirstAnnot + i - 1) to 1
  30.         updateStage()
  31.       end if
  32.     end repeat
  33.   end if
  34. end
  35.  
  36. on clearAnnotations
  37.   global FirstAnnot, AnnotList, NumAnnotations
  38.   if NumAnnotations > 0 then
  39.     repeat with i = 0 to NumAnnotations - 1
  40.       set the visible of sprite (FirstAnnot + i) to 1
  41.       updateStage()
  42.     end repeat
  43.   end if
  44.   set AnnotList to []
  45. end
  46.